package pl.pawluk.inz.entities;

import javax.persistence.Basic;
import javax.persistence.Entity;

/**
 * Created with IntelliJ IDEA.
 * User: mandp
 * Date: 17.05.13
 * Time: 19:39
 * To change this template use File | Settings | File Templates.
 */
@javax.persistence.Table(name = "lecture_id_seq", schema = "public", catalog = "")
@Entity
public class LectureIdSeqEntity {
    private String sequenceName;

    @javax.persistence.Column(name = "sequence_name", nullable = false, insertable = true, updatable = true, length = 2147483647, precision = 0)
    @Basic
    public String getSequenceName() {
        return sequenceName;
    }

    public void setSequenceName(String sequenceName) {
        this.sequenceName = sequenceName;
    }

    private Long lastValue;

    @javax.persistence.Column(name = "last_value", nullable = false, insertable = true, updatable = true, length = 19, precision = 0)
    @Basic
    public Long getLastValue() {
        return lastValue;
    }

    public void setLastValue(Long lastValue) {
        this.lastValue = lastValue;
    }

    private Long startValue;

    @javax.persistence.Column(name = "start_value", nullable = false, insertable = true, updatable = true, length = 19, precision = 0)
    @Basic
    public Long getStartValue() {
        return startValue;
    }

    public void setStartValue(Long startValue) {
        this.startValue = startValue;
    }

    private Long incrementBy;

    @javax.persistence.Column(name = "increment_by", nullable = false, insertable = true, updatable = true, length = 19, precision = 0)
    @Basic
    public Long getIncrementBy() {
        return incrementBy;
    }

    public void setIncrementBy(Long incrementBy) {
        this.incrementBy = incrementBy;
    }

    private Long maxValue;

    @javax.persistence.Column(name = "max_value", nullable = false, insertable = true, updatable = true, length = 19, precision = 0)
    @Basic
    public Long getMaxValue() {
        return maxValue;
    }

    public void setMaxValue(Long maxValue) {
        this.maxValue = maxValue;
    }

    private Long minValue;

    @javax.persistence.Column(name = "min_value", nullable = false, insertable = true, updatable = true, length = 19, precision = 0)
    @Basic
    public Long getMinValue() {
        return minValue;
    }

    public void setMinValue(Long minValue) {
        this.minValue = minValue;
    }

    private Long cacheValue;

    @javax.persistence.Column(name = "cache_value", nullable = false, insertable = true, updatable = true, length = 19, precision = 0)
    @Basic
    public Long getCacheValue() {
        return cacheValue;
    }

    public void setCacheValue(Long cacheValue) {
        this.cacheValue = cacheValue;
    }

    private Long logCnt;

    @javax.persistence.Column(name = "log_cnt", nullable = false, insertable = true, updatable = true, length = 19, precision = 0)
    @Basic
    public Long getLogCnt() {
        return logCnt;
    }

    public void setLogCnt(Long logCnt) {
        this.logCnt = logCnt;
    }

    private Boolean isCycled;

    @javax.persistence.Column(name = "is_cycled", nullable = false, insertable = true, updatable = true, length = 1, precision = 0)
    @Basic
    public Boolean getCycled() {
        return isCycled;
    }

    public void setCycled(Boolean cycled) {
        isCycled = cycled;
    }

    private Boolean isCalled;

    @javax.persistence.Column(name = "is_called", nullable = false, insertable = true, updatable = true, length = 1, precision = 0)
    @Basic
    public Boolean getCalled() {
        return isCalled;
    }

    public void setCalled(Boolean called) {
        isCalled = called;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        LectureIdSeqEntity that = (LectureIdSeqEntity) o;

        if (cacheValue != null ? !cacheValue.equals(that.cacheValue) : that.cacheValue != null) return false;
        if (incrementBy != null ? !incrementBy.equals(that.incrementBy) : that.incrementBy != null) return false;
        if (isCalled != null ? !isCalled.equals(that.isCalled) : that.isCalled != null) return false;
        if (isCycled != null ? !isCycled.equals(that.isCycled) : that.isCycled != null) return false;
        if (lastValue != null ? !lastValue.equals(that.lastValue) : that.lastValue != null) return false;
        if (logCnt != null ? !logCnt.equals(that.logCnt) : that.logCnt != null) return false;
        if (maxValue != null ? !maxValue.equals(that.maxValue) : that.maxValue != null) return false;
        if (minValue != null ? !minValue.equals(that.minValue) : that.minValue != null) return false;
        if (sequenceName != null ? !sequenceName.equals(that.sequenceName) : that.sequenceName != null) return false;
        if (startValue != null ? !startValue.equals(that.startValue) : that.startValue != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = sequenceName != null ? sequenceName.hashCode() : 0;
        result = 31 * result + (lastValue != null ? lastValue.hashCode() : 0);
        result = 31 * result + (startValue != null ? startValue.hashCode() : 0);
        result = 31 * result + (incrementBy != null ? incrementBy.hashCode() : 0);
        result = 31 * result + (maxValue != null ? maxValue.hashCode() : 0);
        result = 31 * result + (minValue != null ? minValue.hashCode() : 0);
        result = 31 * result + (cacheValue != null ? cacheValue.hashCode() : 0);
        result = 31 * result + (logCnt != null ? logCnt.hashCode() : 0);
        result = 31 * result + (isCycled != null ? isCycled.hashCode() : 0);
        result = 31 * result + (isCalled != null ? isCalled.hashCode() : 0);
        return result;
    }
}
